<?php 
include_once "../site_config.php";
include_once "../ra_global.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content=""><meta name="keywords" content=""> 
<title>后台登录</title>
<link href="images/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="tit" style="margin-top:-50px">
	<div class="main"></div>
</div>
</body>
</html>
<?php
if($_GET['logout']){
	$_SESSION['aid']='';
	tellgoto('退出成功','login.php');
}

if($_POST['submit']){
	if(trim($_POST['name'])=='admin' && trim($_POST['password'])=='admin'){
		$_SESSION['aid']=rand(1000,9999);
		tellgoto('登录成功','qr_code.php');
	}else{
		tellgoto('登录失败','login.php');
	}
}
?>
<div class="allbar">
	<form enctype="multipart/form-data" method="post" action="login.php">
	<div style=" width:250px; margin:50px auto;">
		<li>后台登录</li>
		<li><label>用户名：</label><label><input name="name" type="text" value="" style="width:155px" /></label></li>
		<li><label>密码：</label><label><input name="password" type="password" value="" style="width:155px" /></label></li>
		<li style="border:none;"><label>&nbsp;</label><input name="submit" type="submit" value="登录" /></li>
	</div>
	</form>
</div>